Skip to content

Conversation

@netrajpatel
Copy link
Contributor

Defer publish introduced for Asset, Entries and Variant Entries

this.assetsUidMap[uid] = response.uid;
this.assetsUrlMap[url] = response.url;
// Track assets with valid publish_details for deferred publishing
if (!isEmpty(publish_details)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@netrajpatel , With this approach, we lose locale and environment context. We end up blindly publishing assets, entries, and variant entries across all locales and environments. This also ignores entry and variant entry localization scenarios.

In my opinion, we should simply move the existing publish logic into publish module. Before starting the publish process for each module, we can read from these files in the same way we currently do. This avoids the need to store the entire publish information in memory, which could otherwise lead to memory issues.

const entriesWithPublishDetails: Set<string> = new Set();
for (const entry of apiContent) {
if (!isEmpty(entry.publish_details)) {
const validPublishDetails = entry.publish_details.filter((pubDetail: any) =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (this.failedVariantEntries.has(variantEntry.uid)) continue;

if (!isEmpty(variantEntry.publish_details)) {
const validPublishDetails = variantEntry.publish_details.filter((pd: any) =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants